<!-- 右侧  -->


<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/css/bootstrap-select.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js"></script>

<!-- (Optional) Latest compiled and minified JavaScript translation files -->
<!--script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/i18n/defaults-*.min.js"></script-->


<div id="page-inner">
    <div class="panel-body">
        <div class="row">
            <div class="col-md-12">
                <h1 class="page-header">
                    预警 <small>预警规则</small>
                </h1>
            </div>
        </div>
        <div class="row"></div>
        <div id="toolbar" class="btn-group">
            <button id="btn_add" type="button" class="btn btn-default">
                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
            </button>
            <button id="btn_edit" type="button" class="btn btn-default">
                <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>编辑
            </button>
            <button id="btn_delete" type="button" class="btn btn-default">
                <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除
            </button>
            <button id="btn_return" type="button" class="btn btn-default">
                <span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span>返回
            </button>
        </div>
    </div>
    <table id="data_table" class="table-striped table-hover"></table>
</div>


<!-- 添加 -->
<div class="modal fade" id="new_data" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">添加一项预警规则</h4>
            </div>
            <div class="modal-body" id="new_data_body">

                <div class="form-group">
                    <label>规则名称</label>
                    <input class="form-control" placeholder="必填"  id="newname" type="text">
                </div>
                <div class="form-group">
                    <label>字段说明</label>
                    <input class="form-control" placeholder="选填 " id="newdefination" type="text">
                </div>
                <div class="form-group">
                    <label>所在位置</label>
                        <div class="form-group">
                        <select id="workshop" class="form-control selectpicker"
                                data-live-search="true" title="请选择车间名称" multiple
                                data-actions-box="true" data-selected-text-format="count > 5">
                        </select>
                        </div>
                </div>
                <div class="form-group">
                    <label>设备类型</label>
                    <select  class="form-control" id="sort">
                    </select>
                </div>
                <div class="form-group">
                    <label>设备编号</label>
                    <select id = "newsensorRowId" class = "form-control selectpicker"
                            data-live-search="true" title="请选择设备编号" multiple
                            data-actions-box="true" data-selected-text-format="count > 5">
                    </select>
                </div>
                <!--div class="form-group">
                    <label>类型</label>
                    <input class="form-control" placeholder="必填 " id="newruleType" type="text">
                </div-->


                <div class="form-group">
                    <label>三级预警高限值</label>
                    <input class="form-control" placeholder="必填 " id="newruleValue3h" type="text">
                </div>
                <div class="form-group">
                    <label>二级预警高限值</label>
                    <input class="form-control" placeholder="必填 " id="newruleValue2h" type="text">
                </div>
                <div class="form-group">
                    <label>一级预警高限值</label>
                    <input class="form-control" placeholder="必填 " id="newruleValue1h" type="text">
                </div>
                <div class="form-group">
                    <label>正常运行高限值</label>
                    <input class="form-control" placeholder="必填 " id="newruleValue0h" type="text">
                </div>
                <div class="form-group">
                    <label>正常运行低限值</label>
                    <input class="form-control" placeholder="必填 " id="newruleValue0l" type="text">
                </div>
                <div class="form-group">
                    <label>一级预警低限值</label>
                    <input class="form-control" placeholder="必填 " id="newruleValue1l" type="text">
                </div>
                <div class="form-group">
                    <label>二级预警低限值</label>
                    <input class="form-control" placeholder="必填 " id="newruleValue2l" type="text">
                </div>
                <div class="form-group">
                    <label>三级预警低限值</label>
                    <input class="form-control" placeholder="必填 " id="newruleValue3l" type="text">
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="new_data_submit">提交</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<!-- 编辑 -->
<div class="modal fade" id="edit_data" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">编辑预警规则</h4>
            </div>
            <div class="modal-body" id="edit_data_body">
                <div class="form-group">
                    <label>规则名称</label>
                    <input class="form-control" placeholder="必填"  id="editname" type="text" readonly>
                </div>
                <div class="form-group">
                    <label>所在位置</label>
                    <input class="form-control" id = "editWorkshop" type = "text" readonly>
                </div>
                <div class="form-group">
                    <label>设备编号</label>
                    <input class="form-control" id = "editSensorRowId" type = "text" readonly>
                </div>
                <div class="form-group">
                    <label>字段说明</label>
                    <input class="form-control" placeholder="选填 " id="editdefination" type="text">
                </div>
                <div class="form-group">
                    <label>三级预警高限值</label>
                    <input class="form-control" placeholder="必填 " id="editruleValue3H" type="text">
                </div>
                <div class="form-group">
                    <label>二级预警高限值</label>
                    <input class="form-control" placeholder="必填 " id="editruleValue2H" type="text">
                </div>
                <div class="form-group">
                    <label>一级预警高限值</label>
                    <input class="form-control" placeholder="必填 " id="editruleValue1H" type="text">
                </div>
                <div class="form-group">
                    <label>正常运行高限值</label>
                    <input class="form-control" placeholder="必填 " id="editruleValue0H" type="text">
                </div>
                <div class="form-group">
                    <label>正常运行低限值</label>
                    <input class="form-control" placeholder="必填 " id="editruleValue0L" type="text">
                </div>
                <div class="form-group">
                    <label>一级级预警低限值</label>
                    <input class="form-control" placeholder="必填 " id="editruleValue1L" type="text">
                </div>
                <div class="form-group">
                    <label>二级级预警低限值</label>
                    <input class="form-control" placeholder="必填 " id="editruleValue2L" type="text">
                </div>
                <div class="form-group">
                    <label>三级级预警低限值</label>
                    <input class="form-control" placeholder="必填 " id="editruleValue3L" type="text">
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="edit_data_submit">提交</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>


<script src="pages/js/warnning_rule.js"></script>
<script src="pages/js/field_check.js"></script>